﻿using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Runtime.Serialization;
using System.Collections;
using System.Data;
using System.ComponentModel;
using System.Data.OracleClient;
namespace INTEX.DataBase.Tools
{
    public partial class INTEXDBC
    {
        public void MapWGBST(ref DataRow dwLocal, DataRow dwData)
        {
            BlindMap(ref dwLocal, dwData);
        }
        public void SaveWGBST(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            DataSet setResult = new DataSet();
            DataTable tbLocal = null;
            DataRow dwLocal = null;
            bool flgExist = false;
            setResult = QueryWGBST(dwData, 2);
            if (setResult.Tables.Count > 0)
            {
                tbLocal = setResult.Tables[0];
                if (tbLocal.Rows.Count > 0)
                {
                    flgExist = true;
                    dwLocal = tbLocal.Rows[0];
                }
                else
                {
                    dwLocal = tbLocal.NewRow();
                }
            }
            MapWGBST(ref dwLocal, dwData);

            if (!flgExist)
            {
                InsertWGBST(dwLocal);
            }
            UpdateWGBST(dwLocal);
        }
        public void InsertWGBST(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            OracleCommand or1;
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "INSERT INTO WGBST(WGMANDANT, WGSA, WGKUNDNR, WGWERK, WGABT, WGWAKZ, WGART, WGDESS, WGCOLORIT, WGFARBE, WGBESCHICH, WGVAR, WGZUSTAND, WGZENSUR, WGZENSURKZ, WGLO, WGMJJ, WGMM, WGAKTKZ, WGME01, WGME01KG, WGME10, WGME10KG, WGME11, WGME11KG, WGME12, WGME12KG, WGME13, WGME13KG, WGME14, WGME14KG, WGME15, WGME15KG, WGME19, WGME19KG, WGME20, WGME20KG, WGME21, WGME21KG, WGME31, WGME31KG, WGME32, WGME32KG, WGME33, WGME33KG, WGME34, WGME34KG, WGME35, WGME35KG, WGME36, WGME36KG, WGME37, WGME37KG, WGME40, WGME40KG, WGME41, WGME41KG, WGME42, WGME42KG, WGME43, WGME43KG, WGME46, WGME46KG, WGME47, WGME47KG, WGME48, WGME48KG, WGME49, WGME49KG, WGME50, WGME50KG, WGME51, WGME51KG, WGME52, WGME52KG, WGME53, WGME53KG, WGME55, WGME55KG, WGME73, WGME73KG, WGME76, WGME76KG, WGME79, WGME79KG, WGME80, WGME88, WGME89, WGME90, WGME90KG, WGME91, WGME91KG, WGMER04, WGMER05, WGRESV1, WGRESV2, WGRESV3, WGRESV4, WGRESV5, WGBSTA, WGBSTAKG, WGBSTAN, WGBSTANKG, WGMEZUTEI, WGMEZUTEIKG, WGMER02, WGMER02KG, WGBSTKEN, WGBSTKENKG, WGBSTKZU, WGBSTKZUKG, WGBSTKMA, WGBSTKMAKG, WGBSTKME, WGBSTKMEKG, WGBSTMA, WGBSTMAKG, WGBSTME, WGBSTMEKG, WGBSTVMA, WGBSTVMAKG, WGBSTVME, WGBSTVMEKG, WGMEIV, WGMEIVKG, WGINDAT, WGINBST, WGINBSTKG, WGINALT, WGINALTKG, WGEKPRMA, WGEKPRME, WGEKPRZU, WGVRPR, WGDLABST, WGDLABSTKG, WGDLATAG, WGMINBST, WGMINBSTKG, WGMAXBST, WGMAXBSTKG, WGFERTKZ, WGBRT, WGGRQM, WGGRLFD, WGUEBER, WGAENDZL, WGAENB, WGAEND, WGNEUB, WGNEUD,WGFILLER)"
                + " VALUES (:WGMANDANT, :WGSA, :WGKUNDNR, :WGWERK, :WGABT,:WGWAKZ, :WGART,:WGDESS, :WGCOLORIT, :WGFARBE,:WGBESCHICH, :WGVAR"
                    + ", :WGZUSTAND,:WGZENSUR, :WGZENSURKZ, :WGMJJ,:WGMJJ, :WGMM, 'A', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2300, 605, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2300, 605, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 460, 121, '07', 0, 0, 2300, 605, 'F', 14200, 185, 263, 'N', 0, '        ', 0, 'ZMF     ', 20120907, '                                                        ')";
            or1.Parameters.Add("WGMANDANT", OracleType.NVarChar).Value = dwData["WGMANDANT"].ToString();
            or1.Parameters.Add("WGSA", OracleType.NVarChar).Value = dwData["WGSA"].ToString();
            or1.Parameters.Add("WGKUNDNR", OracleType.NVarChar).Value = dwData["WGKUNDNR"].ToString();
            or1.Parameters.Add("WGWERK", OracleType.NVarChar).Value = dwData["WGWERK"].ToString();
            or1.Parameters.Add("WGABT", OracleType.NVarChar).Value = dwData["WGABT"].ToString();
            or1.Parameters.Add("WGWAKZ", OracleType.NVarChar).Value = dwData["WGWAKZ"].ToString();
            or1.Parameters.Add("WGART", OracleType.NVarChar).Value = dwData["WGART"].ToString();
            or1.Parameters.Add("WGDESS", OracleType.NVarChar).Value = dwData["WGDESS"].ToString();
            or1.Parameters.Add("WGCOLORIT", OracleType.NVarChar).Value = dwData["WGCOLORIT"].ToString();
            or1.Parameters.Add("WGFARBE", OracleType.NVarChar).Value = dwData["WGFARBE"].ToString();
            or1.Parameters.Add("WGBESCHICH", OracleType.NVarChar).Value = dwData["WGBESCHICH"].ToString();
            or1.Parameters.Add("WGVAR", OracleType.NVarChar).Value = dwData["WGVAR"].ToString();
            or1.Parameters.Add("WGZUSTAND", OracleType.NVarChar).Value = dwData["WGZUSTAND"].ToString();
            or1.Parameters.Add("WGZENSUR", OracleType.NVarChar).Value = dwData["WGZENSUR"].ToString();
            or1.Parameters.Add("WGZENSURKZ", OracleType.NVarChar).Value = dwData["WGZENSURKZ"].ToString();
            or1.Parameters.Add("WGLO", OracleType.NVarChar).Value = dwData["WGLO"].ToString();
            or1.Parameters.Add("WGMJJ", OracleType.NVarChar).Value = dwData["WGMJJ"].ToString();
            or1.Parameters.Add("WGMM", OracleType.NVarChar).Value = dwData["WGMM"].ToString();
            // WGMANDANT, WGSA, WGKUNDNR, WGWERK, WGABT, WGWAKZ, WGART, WGDESS, WGCOLORIT, WGFARBE, WGBESCHICH, WGVAR
            //, WGZUSTAND, WGZENSUR, WGZENSURKZ, WGLO, WGMJJ, WGMM
            Connect2Proxy(or1);
        }
        public DataSet QueryWGBST(DataRow dwData, int option)
        {
            DataSet Return;
            DataSet Result = new DataSet();
            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 0:
                    or1.CommandText = "SELECT * FROM WGBST WHERE  ROWNUM<2 ";
                    break;
                case 1:
                    or1.CommandText = "SELECT * FROM WGBST WHERE "
                  + "  WGMANDANT=:WGMANDANT AND WGWAKZ=:WGWAKZ AND WGART=:WGART AND WGVAR=:WGVAR"
                  + "  AND WGFARBE=:WGFARBE AND WGBESCHICH=:WGBESCHICH AND WGDESS=:WGDESS AND WGCOLORIT=:WGCOLORIT"
                  + "   AND WGLO=:WGLO"
                  + " ORDER BY WGMJJ DESC,WGMM DESC ";
                    or1.Parameters.Add("WGMANDANT", OracleType.NVarChar).Value = dwData["WGMANDANT"].ToString();
                    or1.Parameters.Add("WGWAKZ", OracleType.NVarChar).Value = dwData["WGWAKZ"].ToString();
                    or1.Parameters.Add("WGART", OracleType.NVarChar).Value = dwData["WGART"].ToString();
                    or1.Parameters.Add("WGVAR", OracleType.NVarChar).Value = dwData["WGVAR"].ToString();
                    or1.Parameters.Add("WGFARBE", OracleType.NVarChar).Value = dwData["WGFARBE"].ToString();
                    or1.Parameters.Add("WGBESCHICH", OracleType.NVarChar).Value = dwData["WGBESCHICH"].ToString();
                    or1.Parameters.Add("WGDESS", OracleType.NVarChar).Value = dwData["WGDESS"].ToString();
                    or1.Parameters.Add("WGCOLORIT", OracleType.NVarChar).Value = dwData["WGCOLORIT"].ToString();
                    or1.Parameters.Add("WGLO", OracleType.NVarChar).Value = dwData["WGLO"].ToString();
                    break;
                case 2:
                    or1.CommandText = "SELECT * FROM WGBST WHERE "
                  + "  WGMANDANT=:WGMANDANT AND WGSA=:WGSA AND WGKUNDNR=:WGKUNDNR AND WGWERK=:WGWERK AND WGABT=:WGABT AND WGWAKZ=:WGWAKZ AND WGART=:WGART AND WGVAR=:WGVAR"
                  + "  AND WGFARBE=:WGFARBE AND WGBESCHICH=:WGBESCHICH AND WGDESS=:WGDESS AND WGCOLORIT=:WGCOLORIT"
                  + "  AND WGZUSTAND=:WGZUSTAND AND WGZENSUR=:WGZENSUR AND WGZENSURKZ=:WGZENSURKZ AND WGLO=:WGLO AND WGMJJ=:WGMJJ AND WGMM=:WGMM"
                  + " ORDER BY WGMJJ DESC,WGMM DESC ";
                    or1.Parameters.Add("WGMANDANT", OracleType.NVarChar).Value = dwData["WGMANDANT"].ToString();
                    or1.Parameters.Add("WGSA", OracleType.NVarChar).Value = dwData["WGSA"].ToString();
                    or1.Parameters.Add("WGKUNDNR", OracleType.NVarChar).Value = dwData["WGKUNDNR"].ToString();
                    or1.Parameters.Add("WGWERK", OracleType.NVarChar).Value = dwData["WGWERK"].ToString();
                    or1.Parameters.Add("WGABT", OracleType.NVarChar).Value = dwData["WGABT"].ToString();
                    or1.Parameters.Add("WGWAKZ", OracleType.NVarChar).Value = dwData["WGWAKZ"].ToString();
                    or1.Parameters.Add("WGART", OracleType.NVarChar).Value = dwData["WGART"].ToString();
                    or1.Parameters.Add("WGDESS", OracleType.NVarChar).Value = dwData["WGDESS"].ToString();
                    or1.Parameters.Add("WGCOLORIT", OracleType.NVarChar).Value = dwData["WGCOLORIT"].ToString();
                    or1.Parameters.Add("WGFARBE", OracleType.NVarChar).Value = dwData["WGFARBE"].ToString();
                    or1.Parameters.Add("WGBESCHICH", OracleType.NVarChar).Value = dwData["WGBESCHICH"].ToString();
                    or1.Parameters.Add("WGVAR", OracleType.NVarChar).Value = dwData["WGVAR"].ToString();
                    or1.Parameters.Add("WGZUSTAND", OracleType.NVarChar).Value = dwData["WGZUSTAND"].ToString();
                    or1.Parameters.Add("WGZENSUR", OracleType.NVarChar).Value = dwData["WGZENSUR"].ToString();
                    or1.Parameters.Add("WGZENSURKZ", OracleType.NVarChar).Value = dwData["WGZENSURKZ"].ToString();
                    or1.Parameters.Add("WGLO", OracleType.NVarChar).Value = dwData["WGLO"].ToString();
                    or1.Parameters.Add("WGMJJ", OracleType.NVarChar).Value = dwData["WGMJJ"].ToString();
                    or1.Parameters.Add("WGMM", OracleType.NVarChar).Value = dwData["WGMM"].ToString();
                    break;
                case 3:
                    or1.CommandText = "SELECT * FROM WGBST WHERE "
                  + "  WGMANDANT=:WGMANDANT   AND WGWAKZ=:WGWAKZ AND WGART=:WGART AND WGVAR=:WGVAR"
                  + "  AND WGFARBE=:WGFARBE  AND WGLO=:WGLO AND WGMJJ=:WGMJJ AND WGMM=:WGMM"
           ;
                    or1.Parameters.Add("WGMANDANT", OracleType.NVarChar).Value = dwData["WGMANDANT"].ToString();
                    or1.Parameters.Add("WGWAKZ", OracleType.NVarChar).Value = dwData["WGWAKZ"].ToString();
                    or1.Parameters.Add("WGART", OracleType.NVarChar).Value = dwData["WGART"].ToString();
                    or1.Parameters.Add("WGFARBE", OracleType.NVarChar).Value = dwData["WGFARBE"].ToString();
                    or1.Parameters.Add("WGVAR", OracleType.NVarChar).Value = dwData["WGVAR"].ToString();
                    or1.Parameters.Add("WGLO", OracleType.NVarChar).Value = dwData["WGLO"].ToString();
                    or1.Parameters.Add("WGMJJ", OracleType.NVarChar).Value = dwData["WGMJJ"].ToString();
                    or1.Parameters.Add("WGMM", OracleType.NVarChar).Value = dwData["WGMM"].ToString();
                    break;
            }


            Result = Connect2Proxy(or1);
            if (Result.Tables.Count > 0)
                Result.Tables[0].TableName = "WGBST";
            Return = Result;
            return Return;
        }
        public void UpdateWGBST(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            OracleCommand or1;
            DataSet result = new DataSet();
            or1 = OracleDB.CreateCommand();

            #region====Command====

            or1.CommandText = "UPDATE WGBST SET "
                + "WGMANDANT=:WGMANDANT,"
                + "WGSA=:WGSA,"
                + "WGKUNDNR=:WGKUNDNR,"
                + "WGWERK=:WGWERK,"
                + "WGABT=:WGABT,"
                + "WGWAKZ=:WGWAKZ,"
                + "WGART=:WGART,"
                + "WGDESS=:WGDESS,"
                + "WGCOLORIT=:WGCOLORIT,"
                + "WGFARBE=:WGFARBE,"
                + "WGBESCHICH=:WGBESCHICH,"
                + "WGVAR=:WGVAR,"
                + "WGZUSTAND=:WGZUSTAND,"
                + "WGZENSUR=:WGZENSUR,"
                + "WGZENSURKZ=:WGZENSURKZ,"
                + "WGLO=:WGLO,"
                + "WGMJJ=:WGMJJ,"
                + "WGMM=:WGMM,"
                + "WGAKTKZ=:WGAKTKZ,"
                + "WGME01=:WGME01,"
                + "WGME01KG=:WGME01KG,"
                + "WGME10=:WGME10,"
                + "WGME10KG=:WGME10KG,"
                + "WGME11=:WGME11,"
                + "WGME11KG=:WGME11KG,"
                + "WGME12=:WGME12,"
                + "WGME12KG=:WGME12KG,"
                + "WGME13=:WGME13,"
                + "WGME13KG=:WGME13KG,"
                + "WGME14=:WGME14,"
                + "WGME14KG=:WGME14KG,"
                + "WGME15=:WGME15,"
                + "WGME15KG=:WGME15KG,"
                + "WGME19=:WGME19,"
                + "WGME19KG=:WGME19KG,"
                + "WGME20=:WGME20,"
                + "WGME20KG=:WGME20KG,"
                + "WGME21=:WGME21,"
                + "WGME21KG=:WGME21KG,"
                + "WGME31=:WGME31,"
                + "WGME31KG=:WGME31KG,"
                + "WGME32=:WGME32,"
                + "WGME32KG=:WGME32KG,"
                + "WGME33=:WGME33,"
                + "WGME33KG=:WGME33KG,"
                + "WGME34=:WGME34,"
                + "WGME34KG=:WGME34KG,"
                + "WGME35=:WGME35,"
                + "WGME35KG=:WGME35KG,"
                + "WGME36=:WGME36,"
                + "WGME36KG=:WGME36KG,"
                + "WGME37=:WGME37,"
                + "WGME37KG=:WGME37KG,"
                + "WGME40=:WGME40,"
                + "WGME40KG=:WGME40KG,"
                + "WGME41=:WGME41,"
                + "WGME41KG=:WGME41KG,"
                + "WGME42=:WGME42,"
                + "WGME42KG=:WGME42KG,"
                + "WGME43=:WGME43,"
                + "WGME43KG=:WGME43KG,"
                + "WGME46=:WGME46,"
                + "WGME46KG=:WGME46KG,"
                + "WGME47=:WGME47,"
                + "WGME47KG=:WGME47KG,"
                + "WGME48=:WGME48,"
                + "WGME48KG=:WGME48KG,"
                + "WGME49=:WGME49,"
                + "WGME49KG=:WGME49KG,"
                + "WGME50=:WGME50,"
                + "WGME50KG=:WGME50KG,"
                + "WGME51=:WGME51,"
                + "WGME51KG=:WGME51KG,"
                + "WGME52=:WGME52,"
                + "WGME52KG=:WGME52KG,"
                + "WGME53=:WGME53,"
                + "WGME53KG=:WGME53KG,"
                + "WGME55=:WGME55,"
                + "WGME55KG=:WGME55KG,"
                + "WGME73=:WGME73,"
                + "WGME73KG=:WGME73KG,"
                + "WGME76=:WGME76,"
                + "WGME76KG=:WGME76KG,"
                + "WGME79=:WGME79,"
                + "WGME79KG=:WGME79KG,"
                + "WGME80=:WGME80,"
                + "WGME88=:WGME88,"
                + "WGME89=:WGME89,"
                + "WGME90=:WGME90,"
                + "WGME90KG=:WGME90KG,"
                + "WGME91=:WGME91,"
                + "WGME91KG=:WGME91KG,"
                + "WGMER04=:WGMER04,"
                + "WGMER05=:WGMER05,"
                + "WGRESV1=:WGRESV1,"
                + "WGRESV2=:WGRESV2,"
                + "WGRESV3=:WGRESV3,"
                + "WGRESV4=:WGRESV4,"
                + "WGRESV5=:WGRESV5,"
                + "WGBSTA=:WGBSTA,"
                + "WGBSTAKG=:WGBSTAKG,"
                + "WGBSTAN=:WGBSTAN,"
                + "WGBSTANKG=:WGBSTANKG,"
                + "WGMEZUTEI=:WGMEZUTEI,"
                + "WGMEZUTEIKG=:WGMEZUTEIKG,"
                + "WGMER02=:WGMER02,"
                + "WGMER02KG=:WGMER02KG,"
                + "WGBSTKEN=:WGBSTKEN,"
                + "WGBSTKENKG=:WGBSTKENKG,"
                + "WGBSTKZU=:WGBSTKZU,"
                + "WGBSTKZUKG=:WGBSTKZUKG,"
                + "WGBSTKMA=:WGBSTKMA,"
                + "WGBSTKMAKG=:WGBSTKMAKG,"
                + "WGBSTKME=:WGBSTKME,"
                + "WGBSTKMEKG=:WGBSTKMEKG,"
                + "WGBSTMA=:WGBSTMA,"
                + "WGBSTMAKG=:WGBSTMAKG,"
                + "WGBSTME=:WGBSTME,"
                + "WGBSTMEKG=:WGBSTMEKG,"
                + "WGBSTVMA=:WGBSTVMA,"
                + "WGBSTVMAKG=:WGBSTVMAKG,"
                + "WGBSTVME=:WGBSTVME,"
                + "WGBSTVMEKG=:WGBSTVMEKG,"
                + "WGMEIV=:WGMEIV,"
                + "WGMEIVKG=:WGMEIVKG,"
                + "WGINDAT=:WGINDAT,"
                + "WGINBST=:WGINBST,"
                + "WGINBSTKG=:WGINBSTKG,"
                + "WGINALT=:WGINALT,"
                + "WGINALTKG=:WGINALTKG,"
                + "WGEKPRMA=:WGEKPRMA,"
                + "WGEKPRME=:WGEKPRME,"
                + "WGEKPRZU=:WGEKPRZU,"
                + "WGVRPR=:WGVRPR,"
                + "WGDLABST=:WGDLABST,"
                + "WGDLABSTKG=:WGDLABSTKG,"
                + "WGDLATAG=:WGDLATAG,"
                + "WGMINBST=:WGMINBST,"
                + "WGMINBSTKG=:WGMINBSTKG,"
                + "WGMAXBST=:WGMAXBST,"
                + "WGMAXBSTKG=:WGMAXBSTKG,"
                + "WGFERTKZ=:WGFERTKZ,"
                + "WGBRT=:WGBRT,"
                + "WGGRQM=:WGGRQM,"
                + "WGGRLFD=:WGGRLFD,"
                + "WGUEBER=:WGUEBER,"
                + "WGAENDZL=:WGAENDZL,"
                + "WGAENB=:WGAENB,"
                + "WGAEND=:WGAEND,"
                + "WGNEUB=:WGNEUB,"
                + "WGNEUD=:WGNEUD,"
                + "WGFILLER=:WGFILLER"
                + " WHERE  "
               + "  WGMANDANT=:WGMANDANT AND WGSA=:WGSA AND WGKUNDNR=:WGKUNDNR AND WGWERK=:WGWERK"
               + "  AND WGABT=:WGABT AND WGWAKZ=:WGWAKZ AND WGART=:WGART AND WGVAR=:WGVAR"
               + "  AND WGFARBE=:WGFARBE AND WGBESCHICH=:WGBESCHICH AND WGDESS=:WGDESS AND WGCOLORIT=:WGCOLORIT"
            + "  AND WGZUSTAND=:WGZUSTAND AND WGZENSUR=:WGZENSUR AND WGZENSURKZ=:WGZENSURKZ AND WGLO=:WGLO"
            + " AND WGMJJ=:WGMJJ AND WGMM=:WGMM ";
            #endregion
            #region====Parameters====
            or1.Parameters.Add("WGMANDANT", OracleType.NVarChar).Value = dwData["WGMANDANT"].ToString();
            or1.Parameters.Add("WGSA", OracleType.NVarChar).Value = dwData["WGSA"].ToString();
            or1.Parameters.Add("WGKUNDNR", OracleType.NVarChar).Value = dwData["WGKUNDNR"].ToString();
            or1.Parameters.Add("WGWERK", OracleType.NVarChar).Value = dwData["WGWERK"].ToString();
            or1.Parameters.Add("WGABT", OracleType.NVarChar).Value = dwData["WGABT"].ToString();
            or1.Parameters.Add("WGWAKZ", OracleType.NVarChar).Value = dwData["WGWAKZ"].ToString();
            or1.Parameters.Add("WGART", OracleType.NVarChar).Value = dwData["WGART"].ToString();
            or1.Parameters.Add("WGDESS", OracleType.NVarChar).Value = dwData["WGDESS"].ToString();
            or1.Parameters.Add("WGCOLORIT", OracleType.NVarChar).Value = dwData["WGCOLORIT"].ToString();
            or1.Parameters.Add("WGFARBE", OracleType.NVarChar).Value = dwData["WGFARBE"].ToString();
            or1.Parameters.Add("WGBESCHICH", OracleType.NVarChar).Value = dwData["WGBESCHICH"].ToString();
            or1.Parameters.Add("WGVAR", OracleType.NVarChar).Value = dwData["WGVAR"].ToString();
            or1.Parameters.Add("WGZUSTAND", OracleType.NVarChar).Value = dwData["WGZUSTAND"].ToString();
            or1.Parameters.Add("WGZENSUR", OracleType.NVarChar).Value = dwData["WGZENSUR"].ToString();
            or1.Parameters.Add("WGZENSURKZ", OracleType.NVarChar).Value = dwData["WGZENSURKZ"].ToString();
            or1.Parameters.Add("WGLO", OracleType.NVarChar).Value = dwData["WGLO"].ToString();
            or1.Parameters.Add("WGMJJ", OracleType.NVarChar).Value = dwData["WGMJJ"].ToString();
            or1.Parameters.Add("WGMM", OracleType.NVarChar).Value = dwData["WGMM"].ToString();
            or1.Parameters.Add("WGAKTKZ", OracleType.NVarChar).Value = dwData["WGAKTKZ"].ToString();
            or1.Parameters.Add("WGME01", OracleType.NVarChar).Value = dwData["WGME01"].ToString();
            or1.Parameters.Add("WGME01KG", OracleType.NVarChar).Value = dwData["WGME01KG"].ToString();
            or1.Parameters.Add("WGME10", OracleType.NVarChar).Value = dwData["WGME10"].ToString();
            or1.Parameters.Add("WGME10KG", OracleType.NVarChar).Value = dwData["WGME10KG"].ToString();
            or1.Parameters.Add("WGME11", OracleType.NVarChar).Value = dwData["WGME11"].ToString();
            or1.Parameters.Add("WGME11KG", OracleType.NVarChar).Value = dwData["WGME11KG"].ToString();
            or1.Parameters.Add("WGME12", OracleType.NVarChar).Value = dwData["WGME12"].ToString();
            or1.Parameters.Add("WGME12KG", OracleType.NVarChar).Value = dwData["WGME12KG"].ToString();
            or1.Parameters.Add("WGME13", OracleType.NVarChar).Value = dwData["WGME13"].ToString();
            or1.Parameters.Add("WGME13KG", OracleType.NVarChar).Value = dwData["WGME13KG"].ToString();
            or1.Parameters.Add("WGME14", OracleType.NVarChar).Value = dwData["WGME14"].ToString();
            or1.Parameters.Add("WGME14KG", OracleType.NVarChar).Value = dwData["WGME14KG"].ToString();
            or1.Parameters.Add("WGME15", OracleType.NVarChar).Value = dwData["WGME15"].ToString();
            or1.Parameters.Add("WGME15KG", OracleType.NVarChar).Value = dwData["WGME15KG"].ToString();
            or1.Parameters.Add("WGME19", OracleType.NVarChar).Value = dwData["WGME19"].ToString();
            or1.Parameters.Add("WGME19KG", OracleType.NVarChar).Value = dwData["WGME19KG"].ToString();
            or1.Parameters.Add("WGME20", OracleType.NVarChar).Value = dwData["WGME20"].ToString();
            or1.Parameters.Add("WGME20KG", OracleType.NVarChar).Value = dwData["WGME20KG"].ToString();
            or1.Parameters.Add("WGME21", OracleType.NVarChar).Value = dwData["WGME21"].ToString();
            or1.Parameters.Add("WGME21KG", OracleType.NVarChar).Value = dwData["WGME21KG"].ToString();
            or1.Parameters.Add("WGME31", OracleType.NVarChar).Value = dwData["WGME31"].ToString();
            or1.Parameters.Add("WGME31KG", OracleType.NVarChar).Value = dwData["WGME31KG"].ToString();
            or1.Parameters.Add("WGME32", OracleType.NVarChar).Value = dwData["WGME32"].ToString();
            or1.Parameters.Add("WGME32KG", OracleType.NVarChar).Value = dwData["WGME32KG"].ToString();
            or1.Parameters.Add("WGME33", OracleType.NVarChar).Value = dwData["WGME33"].ToString();
            or1.Parameters.Add("WGME33KG", OracleType.NVarChar).Value = dwData["WGME33KG"].ToString();
            or1.Parameters.Add("WGME34", OracleType.NVarChar).Value = dwData["WGME34"].ToString();
            or1.Parameters.Add("WGME34KG", OracleType.NVarChar).Value = dwData["WGME34KG"].ToString();
            or1.Parameters.Add("WGME35", OracleType.NVarChar).Value = dwData["WGME35"].ToString();
            or1.Parameters.Add("WGME35KG", OracleType.NVarChar).Value = dwData["WGME35KG"].ToString();
            or1.Parameters.Add("WGME36", OracleType.NVarChar).Value = dwData["WGME36"].ToString();
            or1.Parameters.Add("WGME36KG", OracleType.NVarChar).Value = dwData["WGME36KG"].ToString();
            or1.Parameters.Add("WGME37", OracleType.NVarChar).Value = dwData["WGME37"].ToString();
            or1.Parameters.Add("WGME37KG", OracleType.NVarChar).Value = dwData["WGME37KG"].ToString();
            or1.Parameters.Add("WGME40", OracleType.NVarChar).Value = dwData["WGME40"].ToString();
            or1.Parameters.Add("WGME40KG", OracleType.NVarChar).Value = dwData["WGME40KG"].ToString();
            or1.Parameters.Add("WGME41", OracleType.NVarChar).Value = dwData["WGME41"].ToString();
            or1.Parameters.Add("WGME41KG", OracleType.NVarChar).Value = dwData["WGME41KG"].ToString();
            or1.Parameters.Add("WGME42", OracleType.NVarChar).Value = dwData["WGME42"].ToString();
            or1.Parameters.Add("WGME42KG", OracleType.NVarChar).Value = dwData["WGME42KG"].ToString();
            or1.Parameters.Add("WGME43", OracleType.NVarChar).Value = dwData["WGME43"].ToString();
            or1.Parameters.Add("WGME43KG", OracleType.NVarChar).Value = dwData["WGME43KG"].ToString();
            or1.Parameters.Add("WGME46", OracleType.NVarChar).Value = dwData["WGME46"].ToString();
            or1.Parameters.Add("WGME46KG", OracleType.NVarChar).Value = dwData["WGME46KG"].ToString();
            or1.Parameters.Add("WGME47", OracleType.NVarChar).Value = dwData["WGME47"].ToString();
            or1.Parameters.Add("WGME47KG", OracleType.NVarChar).Value = dwData["WGME47KG"].ToString();
            or1.Parameters.Add("WGME48", OracleType.NVarChar).Value = dwData["WGME48"].ToString();
            or1.Parameters.Add("WGME48KG", OracleType.NVarChar).Value = dwData["WGME48KG"].ToString();
            or1.Parameters.Add("WGME49", OracleType.NVarChar).Value = dwData["WGME49"].ToString();
            or1.Parameters.Add("WGME49KG", OracleType.NVarChar).Value = dwData["WGME49KG"].ToString();
            or1.Parameters.Add("WGME50", OracleType.NVarChar).Value = dwData["WGME50"].ToString();
            or1.Parameters.Add("WGME50KG", OracleType.NVarChar).Value = dwData["WGME50KG"].ToString();
            or1.Parameters.Add("WGME51", OracleType.NVarChar).Value = dwData["WGME51"].ToString();
            or1.Parameters.Add("WGME51KG", OracleType.NVarChar).Value = dwData["WGME51KG"].ToString();
            or1.Parameters.Add("WGME52", OracleType.NVarChar).Value = dwData["WGME52"].ToString();
            or1.Parameters.Add("WGME52KG", OracleType.NVarChar).Value = dwData["WGME52KG"].ToString();
            or1.Parameters.Add("WGME53", OracleType.NVarChar).Value = dwData["WGME53"].ToString();
            or1.Parameters.Add("WGME53KG", OracleType.NVarChar).Value = dwData["WGME53KG"].ToString();
            or1.Parameters.Add("WGME55", OracleType.NVarChar).Value = dwData["WGME55"].ToString();
            or1.Parameters.Add("WGME55KG", OracleType.NVarChar).Value = dwData["WGME55KG"].ToString();
            or1.Parameters.Add("WGME73", OracleType.NVarChar).Value = dwData["WGME73"].ToString();
            or1.Parameters.Add("WGME73KG", OracleType.NVarChar).Value = dwData["WGME73KG"].ToString();
            or1.Parameters.Add("WGME76", OracleType.NVarChar).Value = dwData["WGME76"].ToString();
            or1.Parameters.Add("WGME76KG", OracleType.NVarChar).Value = dwData["WGME76KG"].ToString();
            or1.Parameters.Add("WGME79", OracleType.NVarChar).Value = dwData["WGME79"].ToString();
            or1.Parameters.Add("WGME79KG", OracleType.NVarChar).Value = dwData["WGME79KG"].ToString();
            or1.Parameters.Add("WGME80", OracleType.NVarChar).Value = dwData["WGME80"].ToString();
            or1.Parameters.Add("WGME88", OracleType.NVarChar).Value = dwData["WGME88"].ToString();
            or1.Parameters.Add("WGME89", OracleType.NVarChar).Value = dwData["WGME89"].ToString();
            or1.Parameters.Add("WGME90", OracleType.NVarChar).Value = dwData["WGME90"].ToString();
            or1.Parameters.Add("WGME90KG", OracleType.NVarChar).Value = dwData["WGME90KG"].ToString();
            or1.Parameters.Add("WGME91", OracleType.NVarChar).Value = dwData["WGME91"].ToString();
            or1.Parameters.Add("WGME91KG", OracleType.NVarChar).Value = dwData["WGME91KG"].ToString();
            or1.Parameters.Add("WGMER04", OracleType.NVarChar).Value = dwData["WGMER04"].ToString();
            or1.Parameters.Add("WGMER05", OracleType.NVarChar).Value = dwData["WGMER05"].ToString();
            or1.Parameters.Add("WGRESV1", OracleType.NVarChar).Value = dwData["WGRESV1"].ToString();
            or1.Parameters.Add("WGRESV2", OracleType.NVarChar).Value = dwData["WGRESV2"].ToString();
            or1.Parameters.Add("WGRESV3", OracleType.NVarChar).Value = dwData["WGRESV3"].ToString();
            or1.Parameters.Add("WGRESV4", OracleType.NVarChar).Value = dwData["WGRESV4"].ToString();
            or1.Parameters.Add("WGRESV5", OracleType.NVarChar).Value = dwData["WGRESV5"].ToString();
            or1.Parameters.Add("WGBSTA", OracleType.NVarChar).Value = dwData["WGBSTA"].ToString();
            or1.Parameters.Add("WGBSTAKG", OracleType.NVarChar).Value = dwData["WGBSTAKG"].ToString();
            or1.Parameters.Add("WGBSTAN", OracleType.NVarChar).Value = dwData["WGBSTAN"].ToString();
            or1.Parameters.Add("WGBSTANKG", OracleType.NVarChar).Value = dwData["WGBSTANKG"].ToString();
            or1.Parameters.Add("WGMEZUTEI", OracleType.NVarChar).Value = dwData["WGMEZUTEI"].ToString();
            or1.Parameters.Add("WGMEZUTEIKG", OracleType.NVarChar).Value = dwData["WGMEZUTEIKG"].ToString();
            or1.Parameters.Add("WGMER02", OracleType.NVarChar).Value = dwData["WGMER02"].ToString();
            or1.Parameters.Add("WGMER02KG", OracleType.NVarChar).Value = dwData["WGMER02KG"].ToString();
            or1.Parameters.Add("WGBSTKEN", OracleType.NVarChar).Value = dwData["WGBSTKEN"].ToString();
            or1.Parameters.Add("WGBSTKENKG", OracleType.NVarChar).Value = dwData["WGBSTKENKG"].ToString();
            or1.Parameters.Add("WGBSTKZU", OracleType.NVarChar).Value = dwData["WGBSTKZU"].ToString();
            or1.Parameters.Add("WGBSTKZUKG", OracleType.NVarChar).Value = dwData["WGBSTKZUKG"].ToString();
            or1.Parameters.Add("WGBSTKMA", OracleType.NVarChar).Value = dwData["WGBSTKMA"].ToString();
            or1.Parameters.Add("WGBSTKMAKG", OracleType.NVarChar).Value = dwData["WGBSTKMAKG"].ToString();
            or1.Parameters.Add("WGBSTKME", OracleType.NVarChar).Value = dwData["WGBSTKME"].ToString();
            or1.Parameters.Add("WGBSTKMEKG", OracleType.NVarChar).Value = dwData["WGBSTKMEKG"].ToString();
            or1.Parameters.Add("WGBSTMA", OracleType.NVarChar).Value = dwData["WGBSTMA"].ToString();
            or1.Parameters.Add("WGBSTMAKG", OracleType.NVarChar).Value = dwData["WGBSTMAKG"].ToString();
            or1.Parameters.Add("WGBSTME", OracleType.NVarChar).Value = dwData["WGBSTME"].ToString();
            or1.Parameters.Add("WGBSTMEKG", OracleType.NVarChar).Value = dwData["WGBSTMEKG"].ToString();
            or1.Parameters.Add("WGBSTVMA", OracleType.NVarChar).Value = dwData["WGBSTVMA"].ToString();
            or1.Parameters.Add("WGBSTVMAKG", OracleType.NVarChar).Value = dwData["WGBSTVMAKG"].ToString();
            or1.Parameters.Add("WGBSTVME", OracleType.NVarChar).Value = dwData["WGBSTVME"].ToString();
            or1.Parameters.Add("WGBSTVMEKG", OracleType.NVarChar).Value = dwData["WGBSTVMEKG"].ToString();
            or1.Parameters.Add("WGMEIV", OracleType.NVarChar).Value = dwData["WGMEIV"].ToString();
            or1.Parameters.Add("WGMEIVKG", OracleType.NVarChar).Value = dwData["WGMEIVKG"].ToString();
            or1.Parameters.Add("WGINDAT", OracleType.NVarChar).Value = dwData["WGINDAT"].ToString();
            or1.Parameters.Add("WGINBST", OracleType.NVarChar).Value = dwData["WGINBST"].ToString();
            or1.Parameters.Add("WGINBSTKG", OracleType.NVarChar).Value = dwData["WGINBSTKG"].ToString();
            or1.Parameters.Add("WGINALT", OracleType.NVarChar).Value = dwData["WGINALT"].ToString();
            or1.Parameters.Add("WGINALTKG", OracleType.NVarChar).Value = dwData["WGINALTKG"].ToString();
            or1.Parameters.Add("WGEKPRMA", OracleType.NVarChar).Value = dwData["WGEKPRMA"].ToString();
            or1.Parameters.Add("WGEKPRME", OracleType.NVarChar).Value = dwData["WGEKPRME"].ToString();
            or1.Parameters.Add("WGEKPRZU", OracleType.NVarChar).Value = dwData["WGEKPRZU"].ToString();
            or1.Parameters.Add("WGVRPR", OracleType.NVarChar).Value = dwData["WGVRPR"].ToString();
            or1.Parameters.Add("WGDLABST", OracleType.NVarChar).Value = dwData["WGDLABST"].ToString();
            or1.Parameters.Add("WGDLABSTKG", OracleType.NVarChar).Value = dwData["WGDLABSTKG"].ToString();
            or1.Parameters.Add("WGDLATAG", OracleType.NVarChar).Value = dwData["WGDLATAG"].ToString();
            or1.Parameters.Add("WGMINBST", OracleType.NVarChar).Value = dwData["WGMINBST"].ToString();
            or1.Parameters.Add("WGMINBSTKG", OracleType.NVarChar).Value = dwData["WGMINBSTKG"].ToString();
            or1.Parameters.Add("WGMAXBST", OracleType.NVarChar).Value = dwData["WGMAXBST"].ToString();
            or1.Parameters.Add("WGMAXBSTKG", OracleType.NVarChar).Value = dwData["WGMAXBSTKG"].ToString();
            or1.Parameters.Add("WGFERTKZ", OracleType.NVarChar).Value = dwData["WGFERTKZ"].ToString();
            or1.Parameters.Add("WGBRT", OracleType.NVarChar).Value = dwData["WGBRT"].ToString();
            or1.Parameters.Add("WGGRQM", OracleType.NVarChar).Value = dwData["WGGRQM"].ToString();
            or1.Parameters.Add("WGGRLFD", OracleType.NVarChar).Value = dwData["WGGRLFD"].ToString();
            or1.Parameters.Add("WGUEBER", OracleType.NVarChar).Value = dwData["WGUEBER"].ToString();
            or1.Parameters.Add("WGAENDZL", OracleType.NVarChar).Value = dwData["WGAENDZL"].ToString();
            or1.Parameters.Add("WGAENB", OracleType.NVarChar).Value = dwData["WGAENB"].ToString();
            or1.Parameters.Add("WGAEND", OracleType.NVarChar).Value = dwData["WGAEND"].ToString();
            or1.Parameters.Add("WGNEUB", OracleType.NVarChar).Value = dwData["WGNEUB"].ToString();
            or1.Parameters.Add("WGNEUD", OracleType.NVarChar).Value = dwData["WGNEUD"].ToString();
            or1.Parameters.Add("WGFILLER", OracleType.NVarChar).Value = dwData["WGFILLER"].ToString();
            #endregion

            Connect2Proxy(or1);
        }
    }
}
